package com.tensquare.recurit.dao;


import com.tensquare.recurit.pojo.Recruit;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

public interface RecruitDao extends JpaRepository<Recruit,String>,JpaSpecificationExecutor<Recruit> {

    //1.查询推荐职位列表 (查询状态为2并以创建日期降序排序，查询前4条记录)
    List<Recruit> findTop4ByStateOrderByCreatetimeDesc(String state);

    //2查询最新职位的列表 (查询状态不为0并以创建日期降序排序，查询前12条记录)
    List<Recruit> findTop12ByStateNotOrderByCreatetimeDesc(String state);
}
